package qiu.student;

import qiu.person.Person;

public class Student extends Person {

    private int no;
    private double scoreEn;
    private double scoreMath;
    private double scoreCh;

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public double getScoreEn() {
        return scoreEn;
    }

    public void setScoreEn(double scoreEn) {
        this.scoreEn = scoreEn;
    }

    public double getScoreMath() {
        return scoreMath;
    }

    public void setScoreMath(double scoreMath) {
        this.scoreMath = scoreMath;
    }

    public double getScoreCh() {
        return scoreCh;
    }

    public void setScoreCh(double scoreCh) {
        this.scoreCh = scoreCh;
    }

    public double aver(){
        return (getScoreCh() + getScoreMath() + getScoreEn()) / 3;
    }

    public double max(){
        double a1 = 0;
        if (getScoreCh() > getScoreMath()){
            a1 = getScoreCh();
        }else if (getScoreMath() > getScoreEn()){
            a1 = getScoreMath();
        }else if (getScoreEn() > getScoreCh()){
            a1 = getScoreEn();
        }
        return a1;
    }



}
